<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{.Filename}} - {{.Example.Title}}</title>
    <link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
    <div class="header">
        <div class="container">
            <h1><a href="/">Learn Pascal by Example</a></h1>
        </div>
    </div>
    <div class="container">
        <h2>{{.Example.Title}} - {{.Filename}}</h2>
        
        {{if eq .FileType "image"}}
        <div class="file-display image">
            <img src="/content/{{.Example.Directory}}/{{.Filename}}" alt="{{.Filename}}">
        </div>
        {{else}}
        <div class="code-block">
            <pre>{{.Content}}</pre>
        </div>
        {{end}}
    </div>
    <div class="footer">
        <p><a href="/{{.Example.Directory}}/">返回 {{.Example.Title}}</a> | <a href="/">返回首页</a></p>
    </div>
</body>
</html>